// TServerWorld.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "Log/Log.h"
#include "Log/LogInitializer.h"
#include "../Service/ServiceImpHost.h"
#include "../Service/ServiceImpDB.h"
#include "../Service/ServiceImpLgc.h"



int _tmain(int argc, _TCHAR* argv[])
{
	woe::Properties props;
	if (!props.init("TServerMS.properties"))
	{
		std::cout<<"Failed to load properties file!, Invalid properties file!"<<endl;
		return 0;
	}
	woe::LogInitializer __init(props);

	LOG_INFO("Success to initialize log system!");

	//	for test
	ServiceImpHost	svcHost;
	ServiceImpLgc	svcLgc;
	ServiceImpDB	svcDB;
	ServiceDataSMS	data(&svcHost, &svcLgc, &svcDB, &props);

	svcHost.init(data);
	svcLgc.init(data);
	svcDB.init(data);


	svcHost.start();
	svcLgc.start();
	svcDB.start();

	svcHost.wait();
	svcLgc.wait();
	svcDB.wait();
	return 0;
}

